package com.qys.livesMall.app.user.mapper;

import com.qys.livesMall.app.user.model.entity.AppUserRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qys.livesMall.app.user.model.entity.H2AppUser;

import java.util.List;

/**
 * <p>
 * 用户关系 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2023-10-13
 */
public interface AppUserRelationMapper extends BaseMapper<AppUserRelation> {

    /**
     * 查询 真实，状态正常，充值用户
     * @param userIds
     * @return
     */
    List<Long> getValidUser(List<Long> userIds);

    List<Long> getValidShop(List<Long> userIds);

    List<Long> getGradeValidUser(List<Long> userIds);

    /**
     * 查询所有子集
     * @param userId
     * @return
     */
    List<H2AppUser> getAllLowerLevels(Long userId);
}
